﻿<%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/UserHome.Master" CodeBehind="TutorialHome.aspx.vb" Inherits="LEAD.TutorialHome" 
    title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<tr>
        <td>
        <form id="form1" runat="server">
    
            <table style="width: 100%">
                <tr>
                    <td>&nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                            DataSourceID="SqlDataSource1">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="ActionID" 
            DataNavigateUrlFormatString="Details.aspx?ActionID={0}" 
            DataTextField="Title" HeaderText="Recent Tutorials"
            SortExpression="Title" >
            <ControlStyle Width="200px" />
            <HeaderStyle Width="200px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:HyperLinkField>
                            </Columns>
                        </asp:GridView>
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                            SelectCommand="SELECT TOP 5 [Title], [ActionID] FROM [MasterTable] WHERE TypeID_FK=4">
                        </asp:SqlDataSource>
                        </td>
                    <td><a style="color:Gray;"></a>
                        <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                            DataKeyNames="ActionID" DataSourceID="SqlDataSource2">
                            <Columns>
                                <asp:HyperLinkField DataNavigateUrlFields="ActionID" 
            DataNavigateUrlFormatString="Details.aspx?ActionID={0}" 
            DataTextField="Title" HeaderText="Popular Tutorials"
            SortExpression="Title" >
            <ControlStyle Width="200px" />
            <HeaderStyle Width="200px" />
            <ItemStyle HorizontalAlign="Center" />
        </asp:HyperLinkField>                                <asp:BoundField DataField="Count_page" HeaderText="Visits" 
                                    SortExpression="Count_page" />
                            </Columns>
                        </asp:GridView>
                        <br />
                        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
                            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
                            
                            SelectCommand="SELECT TOP 5 [Title], [ActionID], [Count_page] FROM [MasterTable] WHERE  TypeID_FK=4 ORDER BY [Count_page] DESC">
                        </asp:SqlDataSource>
                        </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;</td>
                    <td>
                        &nbsp;</td>
                </tr>
            </table>
        
    </form>
    </td>
    </tr>
</asp:Content>
